package com.ry;

import com.ry.aop.LogTest;
import com.ry.aop.AspectServices;
import com.ry.ioc.ServicesA;
import com.ry.ioc.ServicesB;
import com.ry.processor.TestBeanPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class ConfigServices {


    @Bean
    public ServicesB servicesB() {
        System.out.println("b");
        return new ServicesB();
    }

    @Bean
    public ServicesA servicesA() {
        System.out.println("a");
        return new ServicesA();
    }

    @Bean
    public static BeanPostProcessor beanPostProcessor() {
        return new TestBeanPostProcessor();
    }

    @Bean
    public LogTest logTest() {
        return new LogTest();
    }

    @Bean
    public AspectServices aspectServices() {
        return new AspectServices();
    }


}
